package com.ces.knacky.model;

import java.io.Serializable;
import java.util.Set;

import org.apache.commons.lang.builder.EqualsBuilder;

import com.ces.knacky.framework.model.AbstractParentEntity;

/** @author Hibernate CodeGenerator */
public class LocationTable extends AbstractParentEntity implements Serializable {

    /** persistent field */
    private String lattitude;

    /** persistent field */
    private String longitude;

    /** nullable persistent field */
    private String city;

    /** nullable persistent field */
    private String zipcode;

    /** persistent field */
    private com.ces.knacky.model.State state;

    /** persistent field */
    private com.ces.knacky.model.Country country;

    /** persistent field */
    private Set addresses;

    /** full constructor */
    public LocationTable(String lattitude, String longitude, String city, String zipcode, com.ces.knacky.model.State state, com.ces.knacky.model.Country country, com.ces.knacky.model.Flag flag, Set addresses) {
        this.lattitude = lattitude;
        this.longitude = longitude;
        this.city = city;
        this.zipcode = zipcode;
        this.state = state;
        this.country = country;
        this.flag = flag;
        this.addresses = addresses;
    }

    /** default constructor */
    public LocationTable() {
    }

    /** minimal constructor */
    public LocationTable(String lattitude, String longitude, com.ces.knacky.model.State state, com.ces.knacky.model.Country country, com.ces.knacky.model.Flag flag, Set addresses) {
        this.lattitude = lattitude;
        this.longitude = longitude;
        this.state = state;
        this.country = country;
        this.flag = flag;
        this.addresses = addresses;
    }

    public String getLattitude() {
        return this.lattitude;
    }

    public void setLattitude(String lattitude) {
        this.lattitude = lattitude;
    }

    public String getLongitude() {
        return this.longitude;
    }

    public void setLongitude(String longitude) {
        this.longitude = longitude;
    }

    public String getCity() {
        return this.city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getZipcode() {
        return this.zipcode;
    }

    public void setZipcode(String zipcode) {
        this.zipcode = zipcode;
    }

    public com.ces.knacky.model.State getState() {
        return this.state;
    }

    public void setState(com.ces.knacky.model.State state) {
        this.state = state;
    }

    public com.ces.knacky.model.Country getCountry() {
        return this.country;
    }

    public void setCountry(com.ces.knacky.model.Country country) {
        this.country = country;
    }

    public Set getAddresses() {
        return this.addresses;
    }

    public void setAddresses(Set addresses) {
        this.addresses = addresses;
    }

    public boolean equals(Object other) {
        if ( !(other instanceof LocationTable) ) return false;
        LocationTable castOther = (LocationTable) other;
        return new EqualsBuilder()
            .append(this.getId(), castOther.getId())
            .isEquals();
    }
}
